package com.grape.pojo;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "T_BOOKMARK")
public class Bookmark implements Serializable{
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "B_ID")	
	@GeneratedValue(strategy=GenerationType.AUTO)  
	private Integer id;
	
	@Column(name = "B_NAME")
	private String bname;
	
	@Column(name = "B_URL")
	private String url;
	
	
	@ManyToOne()
	@JoinColumn(name = "BB_ID")
	private Bookmark_Box bookmark_box;


	@Override
	public String toString() {
		return "Bookmark [id=" + id + ", bname=" + bname + ", url=" + url + "]";
	}


	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getBname() {
		return bname;
	}


	public void setBname(String bname) {
		this.bname = bname;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public Bookmark_Box getBookmark_box() {
		return bookmark_box;
	}


	public void setBookmark_box(Bookmark_Box bookmark_box) {
		this.bookmark_box = bookmark_box;
	}


	public static long getSerialversionuid() {
		return serialVersionUID;
	}


	public Bookmark(Integer id, String bname, String url, Bookmark_Box bookmark_box) {
		super();
		this.id = id;
		this.bname = bname;
		this.url = url;
		this.bookmark_box = bookmark_box;
	}
	
	public Bookmark(String bname, String url,Bookmark_Box bookmark_box) {
		super();
		this.bname = bname;
		this.url = url;
		this.bookmark_box = bookmark_box;
	}
	
	public Bookmark(String bname, String url) {
		super();
		this.bname = bname;
		this.url = url;
	}
	
	
	public Bookmark() {
		// TODO Auto-generated constructor stub
	}

}
